package com.tong.example.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.time.DateFormatUtils;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Date;

@Api(value = "你好", tags = {"你好"})
@RequestMapping("hello")
@RestController
public class HelloController {
    @ApiOperation(value = "招呼")
    @GetMapping("/greeting")
    public String greeting() {
        String date = DateFormatUtils.ISO_8601_EXTENDED_DATETIME_FORMAT.format(new Date());
        return "hello:" + date;
    }
}
